/*  ___ _  ____  __ _  _    ___       _ _          
 * | _ \ |/ /  \/  | \| |  / _ \ _ _ | (_)_ _  ___ 
 * |  _/ ' <| |\/| | .` | | (_) | ' \| | | ' \/ -_)
 * |_| |_|\_\_|  |_|_|\_|  \___/|_||_|_|_|_||_\___|
 */
#ifndef __PKMNONLINE_MAP_H__
#define __PKMNONLINE_MAP_H__
#include "tile.h"

class CMap {
public:
	CMap(int nWidth, int nHeight, int nLayers = 3);
	CMap(const char *szFileName);
	~CMap();

	TILE       *At(int nX, int nY, int nZ);
	inline int	GetWidth() const { return m_nWidth; }
	inline int	GetHeight() const { return m_nHeight; }
	inline int	GetLayerCount() const { return m_nLayers; }
	void		LoadTileDefinition(const char *szFileName);
	TILEINFO   *GetTileInfo(int nX, int nY);

private:
	int				m_nWidth, m_nHeight;
	int				m_nLayers;
	int				m_nSize;
	unsigned char	m_nVersion;
	int				m_nStride;
	TILEINFO       *m_pTileInfo;
	TILE		   *m_pTiles;
};

#endif /* __PKMNONLINE_MAP_H__ */
